<?php


namespace App\Jobs;

use App\Notifications\Wechat\OrderCanceled;

class OrderCanceledJob extends Job
{
    protected $userId;
    protected $tradeNo;
    protected $name;
    protected $actualPrice;
    protected $courseLevels;

    public function __construct($userId, $tradeNo, $name, $actualPrice, $courseLevels)
    {
        $this->userId      = $userId;
        $this->tradeNo     = $tradeNo;
        $this->name        = $name;
        $this->actualPrice = $actualPrice;
        $this->courseLevels = $courseLevels;
    }

    public function handle()
    {
        $orderCancel = new OrderCanceled();
        $orderCancel->notify($this->userId, $this->tradeNo, $this->name, $this->actualPrice, $this->courseLevels);
    }
}
